package error;


import org.orarriinae.common.base.exception.ErrorInfo;

/**
 * 文件异常编码
 *
 * @author xj
 * @since 1.0
 */
public enum FileErrorCode implements ErrorInfo {


    NOT_FOUND_FILE("FILE_0001","文件不存在"),
    FILE_DELETE_FAILE("FILE_0002","文件删除失败"),
    FILE_SERVER_CONNTION_FAILE("FILE_0003","文件服务器连接失败"),
    FILE_UPLOAD_FAILE("FILE_0004","文件上传失败"),
    FILE_FORMAT_IS_ERROR("FILE_0005","获取文件格式失败,请查看上传文件文件名格式是否正确"),
    PAREM_IS_NOT_NULL("FILE_0005","参数不能为空"),
    FILE_NAME_IS_REPEAT("FILE_0006","文件名重复"),
    FILE_SIZE_LIMIT("FILE_0007","单文件最大可上传8M"),
    DOWNLOAD_TOKEN_DISABLED("FILE_0008","downloadToken失效，请重新请求token");
    private final String code;
    private final String message;

    FileErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
